package com.javablog.elasticsearch.es.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.javablog.elasticsearch.es.annotion.AnalyzerType;
import com.javablog.elasticsearch.es.annotion.FieldInterface;
import com.javablog.elasticsearch.es.annotion.FieldType;
import lombok.Data;

import java.util.Date;

@Data
public class DataTest {
    private static final long serialVersionUID=1L;

    @FieldInterface(type = FieldType.LONG)
    private Long qyId;

    /**
     * 唯一标识码
     */
    @FieldInterface(type = FieldType.KEYWORD)
    private String declareStatus;

    /**
     * 任务号
     */
    @FieldInterface(type = FieldType.KEYWORD)
    private String eventCode;

    /**
     * 事件来源编号
     */
    @FieldInterface(type = FieldType.INTEGER)
    private Integer eventSrcId;

    /**
     * 事件来源名称
     */
    @FieldInterface(type = FieldType.TEXT, analyzer = AnalyzerType.IK_PIN_YIN)
    private String eventSrcName;

    /**
     * 来源分组
     */
    @FieldInterface(type = FieldType.KEYWORD)
    private String srcGroupCode;

    /**
     * 事件大类编码
     */
    @FieldInterface(type = FieldType.KEYWORD)
    private String eventTypeCode;

    /**
     * 事件大类名称
     */
    @FieldInterface(type = FieldType.KEYWORD)
    private String eventTypeName;

    /**
     * 创建时间
     */
    @FieldInterface(type = FieldType.DATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @FieldInterface(type = FieldType.DATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;

    /**
     * 删除时间
     */
    @FieldInterface(type = FieldType.DATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date deleteTime;

    /**
     * 更新时间
     */
    @FieldInterface(type = FieldType.BOOLEAN)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Boolean enabled;
}
